package org.gurms.common.util;

public class CommonUtil {

	private CommonUtil(){}
	
	//判断key是否存在于array数组中
	public static boolean exists(String key, String[] array){
		for(String tmp : array){
			if(tmp.equals(key)){
				return true;
			}else{
				continue;
			}
		}
		return false;
	}

	//判断key是否是以head数组中的字符串开头
	public static boolean existHead(String key, String[] head){
		for(String tmpHead : head){
			if(key.indexOf(tmpHead)==0){
				return true;
			}else{
				continue;
			}
		}
		return false;
	}
}
